/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:48 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class KiemtraEntity
    {
        public KiemtraEntity()
        {
			m_pk_ikiemtraid=0;
			m_stenbaikiemtra="";
			m_fk_ikhoahocid=0;
			m_fk_idekiemtraid=0;
			m_fk_ihinhthuckiemtraid=0;
			m_fk_idanhmuckiemtraid=0;
			m_itrangthai=0;
			m_dngaykiemtra=DateTime.Now;
			m_dgiobatdaukiemtra=DateTime.Now;
			m_ithoigianlambai=0;
        }
		private Int64 m_pk_ikiemtraid;
		public Int64 PK_iKiemtraID
		{
			get { return m_pk_ikiemtraid ; }
			set { m_pk_ikiemtraid = value; }
		}
		private String m_stenbaikiemtra;
		public String sTenbaikiemtra
		{
			get { return m_stenbaikiemtra ; }
			set { m_stenbaikiemtra = value; }
		}
		private Int64 m_fk_ikhoahocid;
		public Int64 FK_iKhoahocID
		{
			get { return m_fk_ikhoahocid ; }
			set { m_fk_ikhoahocid = value; }
		}
		private Int64 m_fk_idekiemtraid;
		public Int64 FK_iDekiemtraID
		{
			get { return m_fk_idekiemtraid ; }
			set { m_fk_idekiemtraid = value; }
		}
		private Int16 m_fk_ihinhthuckiemtraid;
		public Int16 FK_iHinhthuckiemtraID
		{
			get { return m_fk_ihinhthuckiemtraid ; }
			set { m_fk_ihinhthuckiemtraid = value; }
		}
		private Int16 m_fk_idanhmuckiemtraid;
		public Int16 FK_iDanhmuckiemtraID
		{
			get { return m_fk_idanhmuckiemtraid ; }
			set { m_fk_idanhmuckiemtraid = value; }
		}
		private Int16 m_itrangthai;
		public Int16 iTrangthai
		{
			get { return m_itrangthai ; }
			set { m_itrangthai = value; }
		}
		private DateTime m_dngaykiemtra;
		public DateTime dNgaykiemtra
		{
			get { return m_dngaykiemtra ; }
			set { m_dngaykiemtra = value; }
		}
		private DateTime m_dgiobatdaukiemtra;
		public DateTime dGiobatdaukiemtra
		{
			get { return m_dgiobatdaukiemtra ; }
			set { m_dgiobatdaukiemtra = value; }
		}
		private Int16 m_ithoigianlambai;
		public Int16 iThoigianlambai
		{
			get { return m_ithoigianlambai ; }
			set { m_ithoigianlambai = value; }
		}

        #region Comparison
        public static List<KiemtraEntity> Sort(List<KiemtraEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(KiemtraEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<KiemtraEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<KiemtraEntity> COMPARISON_PK_iKiemtraID
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.PK_iKiemtraID.CompareTo(other.PK_iKiemtraID);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_sTenbaikiemtra
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.sTenbaikiemtra.CompareTo(other.sTenbaikiemtra);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_FK_iKhoahocID
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.FK_iKhoahocID.CompareTo(other.FK_iKhoahocID);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_FK_iDekiemtraID
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.FK_iDekiemtraID.CompareTo(other.FK_iDekiemtraID);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_FK_iHinhthuckiemtraID
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.FK_iHinhthuckiemtraID.CompareTo(other.FK_iHinhthuckiemtraID);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_FK_iDanhmuckiemtraID
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.FK_iDanhmuckiemtraID.CompareTo(other.FK_iDanhmuckiemtraID);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_iTrangthai
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.iTrangthai.CompareTo(other.iTrangthai);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_dNgaykiemtra
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.dNgaykiemtra.CompareTo(other.dNgaykiemtra);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_dGiobatdaukiemtra
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.dGiobatdaukiemtra.CompareTo(other.dGiobatdaukiemtra);
				};
			}
		}
		public static Comparison<KiemtraEntity> COMPARISON_iThoigianlambai
		{
			get
			{
				return delegate(KiemtraEntity entity,KiemtraEntity other)
				{
					return entity.iThoigianlambai.CompareTo(other.iThoigianlambai);
				};
			}
		}
        #endregion
    }
}
